package com.pzsh.util;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class BigDecimalUtil {

    /**
     * 除以100，返回字符串,2位小数
     * @param num
     * @return
     */
    public static String caseString_2(Integer num){
        int bl = 2;//保留2位小数
        BigDecimal bigDecimal = new BigDecimal(num);
        BigDecimal one100 = new BigDecimal(100);
        String res = String.valueOf(bigDecimal.divide(one100, bl, RoundingMode.HALF_UP));
        return res;
    }
}
